<!DOCTYPE html>
<html lang="zh-CN">
    <head>
        <meta charset="utf-8">
        <meta name="viewport" content="width=device-width, initial-scale=1">
        <meta name="robots" content="noodp" />
        <meta http-equiv="X-UA-Compatible" content="IE=edge, chrome=1">
        <title>linux 下安装 aria2 及自动上传到 OneDrive - NeverLand</title><meta name="Description" content="someone&#39;s blog"><meta property="og:title" content="linux 下安装 aria2 及自动上传到 OneDrive" />
<meta property="og:description" content="在 ECS 使用 aria2 下载与没有公网 IP 的 PC 相比有一定优势，但是 Lucas 所用的阿里云的小水管下载有 100 MB ，上传只有 1 MB，取回下好的东西还要漫长的等待。本文即为解决这一问题而写。" />
<meta property="og:type" content="article" />
<meta property="og:url" content="https://lucas-0.github.io/2020-05-14-install-aria2/" />
<meta property="og:image" content="https://lucas-0.github.io/images/island.svg"/>
<meta property="article:published_time" content="2020-05-14T15:19:15+08:00" />
<meta property="article:modified_time" content="2020-09-24T12:54:16+08:00" />
<meta name="twitter:card" content="summary_large_image"/>
<meta name="twitter:image" content="https://lucas-0.github.io/images/island.svg"/>

<meta name="twitter:title" content="linux 下安装 aria2 及自动上传到 OneDrive"/>
<meta name="twitter:description" content="在 ECS 使用 aria2 下载与没有公网 IP 的 PC 相比有一定优势，但是 Lucas 所用的阿里云的小水管下载有 100 MB ，上传只有 1 MB，取回下好的东西还要漫长的等待。本文即为解决这一问题而写。"/>
<meta name="application-name" content="NeverLand">
<meta name="apple-mobile-web-app-title" content="NeverLand"><meta name="theme-color" content="#ffffff"><meta name="msapplication-TileColor" content="#da532c"><link rel="canonical" href="https://lucas-0.github.io/2020-05-14-install-aria2/" /><link rel="prev" href="https://lucas-0.github.io/2020-05-05-git-get-started/" /><link rel="next" href="https://lucas-0.github.io/2020-06-30-hugo-and-loveit/" /><link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/normalize.css@8.0.1/normalize.min.css"><link rel="stylesheet" href="/css/style.min.css"><link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@fortawesome/fontawesome-free@5.13.0/css/all.min.css"><link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/animate.css@3.7.2/animate.min.css"><script type="application/ld+json">
    {
        "@context": "http://schema.org",
        "@type": "BlogPosting",
        "headline": "linux 下安装 aria2 及自动上传到 OneDrive",
        "inLanguage": "zh-CN",
        "mainEntityOfPage": {
            "@type": "WebPage",
            "@id": "https:\/\/lucas-0.github.io\/2020-05-14-install-aria2\/"
        },"image": [{
                            "@type": "ImageObject",
                            "url": "https:\/\/lucas-0.github.io\/images\/Apple-Devices-Preview.png",
                            "width":  3200 ,
                            "height":  2048 
                        }],"genre": "posts","keywords": "aria2, OneDrive","wordcount":  2393 ,
        "url": "https:\/\/lucas-0.github.io\/2020-05-14-install-aria2\/","datePublished": "2020-05-14T15:19:15+08:00","dateModified": "2020-09-24T12:54:16+08:00","license": "This work is licensed under a Creative Commons Attribution-NonCommercial 4.0 International License.","publisher": {
            "@type": "Organization",
            "name": "Lucas","logo": {
                    "@type": "ImageObject",
                    "url": "https:\/\/lucas-0.github.io\/images\/avatar.png",
                    "width":  925 ,
                    "height":  925 
                }},"author": {
                "@type": "Person",
                "name": "Lucas"
            },"description": ""
    }
    </script></head>
    <body header-desktop="fixed" header-mobile="auto"><script type="text/javascript">(window.localStorage && localStorage.getItem('theme') ? localStorage.getItem('theme') === 'dark' : ('auto' === 'auto' ? window.matchMedia('(prefers-color-scheme: dark)').matches : 'auto' === 'dark')) && document.body.setAttribute('theme', 'dark');</script>

        <div id="mask"></div><div class="wrapper"><header class="desktop" id="header-desktop">
    <div class="header-wrapper">
        <div class="header-title">
            <a href="/" title="NeverLand"><img
        class="lazyload logo"
        src="/svg/loading.min.svg"
        data-src="/images/myicon.svg"
        data-srcset="/images/myicon.svg, /images/myicon.svg 1.5x, /images/myicon.svg 2x"
        data-sizes="auto"
        alt="/images/myicon.svg"
        title="/images/myicon.svg" />NeverLand<span class="header-title-post"><i class='fas fa-palette'></i></span></a>
        </div>
        <div class="menu">
            <div class="menu-inner"><a class="menu-item" href="/posts/" title="posts"><i class='far fa-folder-open'></i>&nbsp; 文章 </a><a class="menu-item" href="/tags/" title="tags"><i class='fas fa-tags'></i>&nbsp; 标签 </a><a class="menu-item" href="/categories/" title="categories"><i class='fas fa-grip-horizontal'></i>&nbsp; 分类 </a><a class="menu-item" href="/links/" title="links"><i class='fas fa-archive'></i>&nbsp; 展示 </a><a class="menu-item" href="/about/" title="about"><i class='fas fa-portrait'></i>&nbsp; 关于 </a><a class="menu-item" href="https://github.com/Lucas-0" title="GitHub" rel="noopener noreffer" target="_blank"><i class='fab fa-github fa-fw'></i>  </a><span class="menu-item delimiter"></span><span class="menu-item search" id="search-desktop">
                        <input type="text" placeholder="找找好康的?" id="search-input-desktop">
                        <a href="javascript:void(0);" class="search-button search-toggle" id="search-toggle-desktop" title="搜索">
                            <i class="fas fa-search fa-fw"></i>
                        </a>
                        <a href="javascript:void(0);" class="search-button search-clear" id="search-clear-desktop" title="清空">
                            <i class="fas fa-times-circle fa-fw"></i>
                        </a>
                        <span class="search-button search-loading" id="search-loading-desktop">
                            <i class="fas fa-spinner fa-fw fa-spin"></i>
                        </span>
                    </span><a href="javascript:void(0);" class="menu-item theme-switch" title="切换主题">
                    <i class="fas fa-adjust fa-fw"></i>
                </a>
            </div>
        </div>
    </div>
</header><header class="mobile" id="header-mobile">
    <div class="header-container">
        <div class="header-wrapper">
            <div class="header-title">
                <a href="/" title="NeverLand"><img
        class="lazyload logo"
        src="/svg/loading.min.svg"
        data-src="/images/myicon.svg"
        data-srcset="/images/myicon.svg, /images/myicon.svg 1.5x, /images/myicon.svg 2x"
        data-sizes="auto"
        alt="/images/myicon.svg"
        title="/images/myicon.svg" />NeverLand<span class="header-title-post"><i class='fas fa-palette'></i></span></a>
            </div>
            <div class="menu-toggle" id="menu-toggle-mobile">
                <span></span><span></span><span></span>
            </div>
        </div>
        <div class="menu" id="menu-mobile"><div class="search-wrapper">
                    <div class="search mobile" id="search-mobile">
                        <input type="text" placeholder="找找好康的?" id="search-input-mobile">
                        <a href="javascript:void(0);" class="search-button search-toggle" id="search-toggle-mobile" title="搜索">
                            <i class="fas fa-search fa-fw"></i>
                        </a>
                        <a href="javascript:void(0);" class="search-button search-clear" id="search-clear-mobile" title="清空">
                            <i class="fas fa-times-circle fa-fw"></i>
                        </a>
                        <span class="search-button search-loading" id="search-loading-mobile">
                            <i class="fas fa-spinner fa-fw fa-spin"></i>
                        </span>
                    </div>
                    <a href="javascript:void(0);" class="search-cancel" id="search-cancel-mobile">
                        取消
                    </a>
                </div><a class="menu-item" href="/posts/" title="posts"><i class='far fa-folder-open'></i>&nbsp;文章</a><a class="menu-item" href="/tags/" title="tags"><i class='fas fa-tags'></i>&nbsp;标签</a><a class="menu-item" href="/categories/" title="categories"><i class='fas fa-grip-horizontal'></i>&nbsp;分类</a><a class="menu-item" href="/links/" title="links"><i class='fas fa-archive'></i>&nbsp;展示</a><a class="menu-item" href="/about/" title="about"><i class='fas fa-portrait'></i>&nbsp;关于</a><a class="menu-item" href="https://github.com/Lucas-0" title="GitHub" rel="noopener noreffer" target="_blank"><i class='fab fa-github fa-fw'></i></a><a href="javascript:void(0);" class="menu-item theme-switch" title="切换主题">
                <i class="fas fa-adjust fa-fw"></i>
            </a></div>
    </div>
</header>
<div class="search-dropdown desktop">
    <div id="search-dropdown-desktop"></div>
</div>
<div class="search-dropdown mobile">
    <div id="search-dropdown-mobile"></div>
</div>
<main class="main">
                <div class="container"><div class="toc" id="toc-auto">
            <h2 class="toc-title">目录</h2>
            <div class="toc-content" id="toc-content-auto"></div>
        </div><article class="page single"><h1 class="single-title animated flipInX">linux 下安装 aria2 及自动上传到 OneDrive</h1><div class="post-meta">
            <div class="post-meta-line"><span class="post-author"><a href="https://lucas-0.github.io/about/" title="Author" target="_blank" rel="noopener noreffer author" class="author"><i class="fas fa-user-circle fa-fw"></i>Lucas</a></span>&nbsp;<span class="post-category">收录于 <a href="/categories/%E6%8A%80%E6%9C%AF/"><i class="far fa-folder fa-fw"></i>技术</a></span></div>
            <div class="post-meta-line"><i class="far fa-calendar-alt fa-fw"></i>&nbsp;<time datetime="2020-05-14">2020-05-14</time>&nbsp;<i class="fas fa-pencil-alt fa-fw"></i>&nbsp;约 2393 字&nbsp;
                <i class="far fa-clock fa-fw"></i>&nbsp;预计阅读 5 分钟&nbsp;</div>
        </div><div class="details toc" id="toc-static"  kept="">
                <div class="details-summary toc-title">
                    <span>目录</span>
                    <span><i class="details-icon fas fa-angle-right"></i></span>
                </div>
                <div class="details-content toc-content" id="toc-content-static"><nav id="TableOfContents">
  <ul>
    <li><a href="#安装-aria2">安装 aria2 </a>
      <ul>
        <li><a href="#1-下载解压--aria2">1. 下载解压  aria2 </a></li>
        <li><a href="#2-检查是否安装成功">2. 检查是否安装成功</a></li>
        <li><a href="#3-下载-aria2-配置">3. 下载 aria2 配置</a></li>
        <li><a href="#4-配置-aria2rpc-密钥">4. 配置 aria2RPC 密钥 </a></li>
      </ul>
    </li>
    <li><a href="#设置开机启动">设置开机启动</a></li>
    <li><a href="#onedrive上传控件">OneDrive上传控件</a>
      <ul>
        <li><a href="#1-安装onedriveuploader">1. 安装OneDriveUploader</a></li>
        <li><a href="#2-初始化配置">2. 初始化配置</a></li>
        <li><a href="#3-使用命令">3. 使用命令</a></li>
        <li><a href="#4-命令示例">4. 命令示例</a></li>
      </ul>
    </li>
    <li><a href="#aria2-自动上传">aria2 自动上传</a>
      <ul>
        <li><a href="#1-aria2-自动上传脚本">1. aria2 自动上传脚本</a></li>
        <li><a href="#2-下载完成后执行">2. 下载完成后执行</a></li>
      </ul>
    </li>
  </ul>
</nav></div>
            </div><div class="content" id="content"><hr>
</br>
<p><strong>更新：</strong><a href="https://github.com/uselibrary/Aria2Drive" target="_blank" rel="noopener noreffer">https://github.com/uselibrary/Aria2Drive</a></p>
</br>
<hr>
<p>在 ECS 使用 aria2 下载与没有公网 IP 的 PC 相比有一定优势，但是 Lucas 所用的阿里云的小水管下载有 100 MB ，上传只有 1 MB，取回下好的东西还要漫长的等待。本文即为解决这一问题而写。</p>
<p>需要：<mark> OneDrive 账号</mark></p>
<p>本文的系统为 <code>Ubuntu 18.04.4</code> 。</p>
<p>参考了下面的链接：</p>
<p><a href="https://www.showdoc.cc/pyone?page_id=2564166102352569" target="_blank" rel="noopener noreffer">PyOne使用文档&ndash;ShowDoc</a></p>
<p><a href="https://www.moerats.com/archives/1006/" target="_blank" rel="noopener noreffer">一个好用的OneDrive网盘上传工具，支持文件和文件夹上传</a></p>
<p><a href="https://www.moerats.com/archives/482/" target="_blank" rel="noopener noreffer">使用Aira2下载文件后自动上传到Google Drive网盘</a></p>
<p>  </p>
<p>  </p>
<h2 id="安装-aria2">安装 aria2 </h2>
<p>推荐在宝塔下进行操作。<a href="https://www.bt.cn/" target="_blank" rel="noopener noreffer">➡前往宝塔</a></p>
<h3 id="1-下载解压--aria2">1. 下载解压  aria2 </h3>
<p>请检查链接是否为最新版，<a href="https://github.com/aria2/aria2" target="_blank" rel="noopener noreffer">GitHub项目地址</a></p>
<div class="highlight"><div class="chroma">
<table class="lntable"><tr><td class="lntd">
<pre class="chroma"><code><span class="lnt">1
</span><span class="lnt">2
</span><span class="lnt">3
</span><span class="lnt">4
</span><span class="lnt">5
</span><span class="lnt">6
</span><span class="lnt">7
</span></code></pre></td>
<td class="lntd">
<pre class="chroma"><code class="language-bash" data-lang="bash">wget -N --no-check-certificate https://github.com/aria2/aria2/releases/download/release-1.35.0/aria2-1.35.0.tar.gz
tar zxvf aria2-1.35.0.tar.gz
rm -rf aria2-1.35.0.tar.gz
<span class="nb">cd</span> aria2-1.35.0
make install
<span class="nb">cd</span> ..
rm -rf aria2-1.35.0
</code></pre></td></tr></table>
</div>
</div><p>上面做的事情：下载➡解压➡删除压缩包➡进入解压的文件夹➡运行安装➡回到上一层文件夹➡删除解压的文件夹。</p>
<p>阿里云的 ECS 连接 GitHub 很慢，推荐下载到电脑上，利用宝塔手动上传，到哪个文件夹不重要，最终都会删掉。</p>
<h3 id="2-检查是否安装成功">2. 检查是否安装成功</h3>
<div class="highlight"><div class="chroma">
<table class="lntable"><tr><td class="lntd">
<pre class="chroma"><code><span class="lnt">1
</span></code></pre></td>
<td class="lntd">
<pre class="chroma"><code class="language-bash" data-lang="bash"><span class="nb">command</span> -v aria2c
</code></pre></td></tr></table>
</div>
</div><p>如果显示</p>
<div class="highlight"><div class="chroma">
<table class="lntable"><tr><td class="lntd">
<pre class="chroma"><code><span class="lnt">1
</span></code></pre></td>
<td class="lntd">
<pre class="chroma"><code class="language-bash" data-lang="bash">/usr/bin/aria2c
</code></pre></td></tr></table>
</div>
</div><p>说明安装成功。</p>
<h3 id="3-下载-aria2-配置">3. 下载 aria2 配置</h3>
<div class="highlight"><div class="chroma">
<table class="lntable"><tr><td class="lntd">
<pre class="chroma"><code><span class="lnt">1
</span><span class="lnt">2
</span><span class="lnt">3
</span><span class="lnt">4
</span><span class="lnt">5
</span><span class="lnt">6
</span><span class="lnt">7
</span></code></pre></td>
<td class="lntd">
<pre class="chroma"><code class="language-bash" data-lang="bash">mkdir <span class="s2">&#34;/root/.aria2&#34;</span> <span class="o">&amp;&amp;</span> mkdir /root/Download
wget -N --no-check-certificate https://lucasdrive.imfast.io/Program/aria2/dht.dat -P <span class="s1">&#39;/root/.aria2/&#39;</span>
wget -N --no-check-certificate https://lucasdrive.imfast.io/Program/aria2/aria2.conf -P <span class="s1">&#39;/root/.aria2/&#39;</span>
wget -N --no-check-certificate https://lucasdrive.imfast.io/Program/aria2/trackers-list-aria2.sh -P <span class="s1">&#39;/root/.aria2/&#39;</span>
touch /root/.aria2/aria2.session
chmod +x /root/.aria2/trackers-list-aria2.sh
chmod <span class="m">777</span> /root/.aria2/aria2.session  
</code></pre></td></tr></table>
</div>
</div><p>上面的链接可能会失效，届时配置文件也可按照其他教程设置。</p>
<h3 id="4-配置-aria2rpc-密钥">4. 配置 aria2RPC 密钥 </h3>
<p>修改文件 <code>/root/.aria2/aria2.conf</code> ，找到 <code>rpc-secret</code> ，然后给 <code>rpc-secret</code> 设置密码，作为密钥。</p>
<p>✅：注意要在宝塔面板中将 <code>aria2</code> 监听的端口放行，以及（如果有）安全组规则放行，否则 <code>aria2</code> 的速度会受到很大影响。</p>
<hr>
<p>  </p>
<h2 id="设置开机启动">设置开机启动</h2>
<p>创建 <code>/etc/systemd/system/aria2.service</code> ，不习惯 <code>vim</code> 可以直接在宝塔中新建文件，内容为：</p>
<div class="highlight"><div class="chroma">
<table class="lntable"><tr><td class="lntd">
<pre class="chroma"><code><span class="lnt"> 1
</span><span class="lnt"> 2
</span><span class="lnt"> 3
</span><span class="lnt"> 4
</span><span class="lnt"> 5
</span><span class="lnt"> 6
</span><span class="lnt"> 7
</span><span class="lnt"> 8
</span><span class="lnt"> 9
</span><span class="lnt">10
</span><span class="lnt">11
</span><span class="lnt">12
</span><span class="lnt">13
</span></code></pre></td>
<td class="lntd">
<pre class="chroma"><code class="language-bash" data-lang="bash"><span class="o">[</span>Unit<span class="o">]</span>
<span class="nv">Description</span><span class="o">=</span>Aria2 server
<span class="nv">After</span><span class="o">=</span>network.target
<span class="nv">Wants</span><span class="o">=</span>network.target
<span class="o">[</span>Service<span class="o">]</span>
<span class="nv">Type</span><span class="o">=</span>simple
<span class="nv">PIDFile</span><span class="o">=</span>/var/run/aria2c.pid
<span class="nv">ExecStart</span><span class="o">=</span>/usr/bin/aria2c --conf-path<span class="o">=</span>/root/.aria2/aria2.conf
<span class="nv">RestartPreventExitStatus</span><span class="o">=</span><span class="m">23</span>
<span class="nv">Restart</span><span class="o">=</span>always
<span class="nv">User</span><span class="o">=</span>root
<span class="o">[</span>Install<span class="o">]</span>
<span class="nv">WantedBy</span><span class="o">=</span>multi-user.target
</code></pre></td></tr></table>
</div>
</div><p>然后 <kbd>esc</kbd> 、 <kbd>:wq</kbd> 退出保存，执行命令：</p>
<div class="highlight"><div class="chroma">
<table class="lntable"><tr><td class="lntd">
<pre class="chroma"><code><span class="lnt">1
</span><span class="lnt">2
</span></code></pre></td>
<td class="lntd">
<pre class="chroma"><code class="language-bash" data-lang="bash">systemctl <span class="nb">enable</span> aria2
systemctl start aria2
</code></pre></td></tr></table>
</div>
</div><p>此时 aria2 已经启动。</p>
<hr>
<p>  </p>
<h2 id="onedrive上传控件">OneDrive上传控件</h2>
<p>点击右侧 <code>URL</code> 登录 OneDrive 并授权，授权地址→【<a href="https://login.microsoftonline.com/common/oauth2/v2.0/authorize?client_id=78d4dc35-7e46-42c6-9023-2d39314433a5&amp;response_type=code&amp;redirect_uri=http://localhost/onedrive-login&amp;response_mode=query&amp;scope=offline_access%20User.Read%20Files.ReadWrite.All" target="_blank" rel="noopener noreffer">国际版、个人版(家庭版)</a>】、【<a href="https://login.chinacloudapi.cn/common/oauth2/v2.0/authorize?client_id=dfe36e60-6133-48cf-869f-4d15b8354769&amp;response_type=code&amp;redirect_uri=http://localhost/onedrive-login&amp;response_mode=query&amp;scope=offline_access%20User.Read%20Files.ReadWrite.All" target="_blank" rel="noopener noreffer">世纪互联</a>】。</p>
<p>授权后会获取一个 <code>localhost</code> 开头打不开的链接，这里复制好整个链接地址，包括 <code>localhost</code> 。</p>
<h3 id="1-安装onedriveuploader">1. 安装OneDriveUploader</h3>
<div class="highlight"><div class="chroma">
<table class="lntable"><tr><td class="lntd">
<pre class="chroma"><code><span class="lnt">1
</span><span class="lnt">2
</span><span class="lnt">3
</span><span class="lnt">4
</span><span class="lnt">5
</span><span class="lnt">6
</span><span class="lnt">7
</span><span class="lnt">8
</span><span class="lnt">9
</span></code></pre></td>
<td class="lntd">
<pre class="chroma"><code class="language-bash" data-lang="bash"><span class="c1">#64位系统下载</span>
wget https://raw.githubusercontent.com/MoeClub/OneList/master/OneDriveUploader/amd64/linux/OneDriveUploader -P /usr/local/bin/
<span class="c1">#32位系统下载</span>
wget https://raw.githubusercontent.com/MoeClub/OneList/master/OneDriveUploader/i386/linux/OneDriveUploader -P /usr/local/bin/
<span class="c1">#arm架构下载</span>
wget https://raw.githubusercontent.com/MoeClub/OneList/master/OneDriveUploader/arm/linux/OneDriveUploader -P /usr/local/bin/

<span class="c1">#给予权限</span>
chmod +x /usr/local/bin/OneDriveUploader
</code></pre></td></tr></table>
</div>
</div><h3 id="2-初始化配置">2. 初始化配置</h3>
<div class="highlight"><div class="chroma">
<table class="lntable"><tr><td class="lntd">
<pre class="chroma"><code><span class="lnt">1
</span><span class="lnt">2
</span><span class="lnt">3
</span><span class="lnt">4
</span><span class="lnt">5
</span><span class="lnt">6
</span><span class="lnt">7
</span><span class="lnt">8
</span></code></pre></td>
<td class="lntd">
<pre class="chroma"><code class="language-bash" data-lang="bash"><span class="c1">#国际版，将url换成你上面复制的授权地址，包括http://loaclhost。</span>
OneDriveUploader -a <span class="s2">&#34;url&#34;</span>

<span class="c1">#个人版(家庭版)，将url换成你上面复制的授权地址，包括http://loaclhost。</span>
OneDriveUploader -ms -a <span class="s2">&#34;url&#34;</span>

<span class="c1">#中国版(世纪互联)，将url换成你上面复制的授权地址，包括http://loaclhost。</span>
OneDriveUploader -cn -a <span class="s2">&#34;url&#34;</span>
</code></pre></td></tr></table>
</div>
</div><p>如果提示 <code>Init config file: /root/auth.json</code> 类似信息，则初始化成功。</p>
<h3 id="3-使用命令">3. 使用命令</h3>
<div class="highlight"><div class="chroma">
<table class="lntable"><tr><td class="lntd">
<pre class="chroma"><code><span class="lnt"> 1
</span><span class="lnt"> 2
</span><span class="lnt"> 3
</span><span class="lnt"> 4
</span><span class="lnt"> 5
</span><span class="lnt"> 6
</span><span class="lnt"> 7
</span><span class="lnt"> 8
</span><span class="lnt"> 9
</span><span class="lnt">10
</span><span class="lnt">11
</span><span class="lnt">12
</span><span class="lnt">13
</span><span class="lnt">14
</span><span class="lnt">15
</span><span class="lnt">16
</span><span class="lnt">17
</span><span class="lnt">18
</span><span class="lnt">19
</span><span class="lnt">20
</span><span class="lnt">21
</span><span class="lnt">22
</span><span class="lnt">23
</span><span class="lnt">24
</span><span class="lnt">25
</span><span class="lnt">26
</span><span class="lnt">27
</span><span class="lnt">28
</span><span class="lnt">29
</span><span class="lnt">30
</span><span class="lnt">31
</span><span class="lnt">32
</span><span class="lnt">33
</span><span class="lnt">34
</span><span class="lnt">35
</span><span class="lnt">36
</span><span class="lnt">37
</span><span class="lnt">38
</span><span class="lnt">39
</span></code></pre></td>
<td class="lntd">
<pre class="chroma"><code class="language-bash" data-lang="bash">Usage of OneDriveUploader:
  -a string
        // 初始化授权
        Setup and Init auth.json.
  -b string
        // 自定义上传分块大小, 可以提高网络吞吐量, 受限于磁盘性能和网络速度.
        Set block size. <span class="o">[</span>Unit: M<span class="p">;</span> 5&lt;<span class="o">=</span>b&lt;<span class="o">=</span>60<span class="p">;</span><span class="o">]</span> <span class="o">(</span>default <span class="s2">&#34;10&#34;</span><span class="o">)</span>
  -c string
        // 配置文件路径
        Config file. <span class="o">(</span>default <span class="s2">&#34;auth.json&#34;</span><span class="o">)</span>
  -n string
        // 上传单个文件时,在网盘中重命名
        Rename file on upload to remote.
  -r string
        // 上传到网盘中的某个目录, 默认: 根目录
        Upload to reomte path.
  -s string
        // *必要参数, 要上传的文件或文件夹
        Upload item.
  -t string
        // 线程数, 同时上传文件的个数. 默认: <span class="m">2</span>
        Set thread num. <span class="o">(</span>default <span class="s2">&#34;2&#34;</span><span class="o">)</span>
  -f
        // 开关<span class="o">(</span>推荐<span class="o">)</span>
        // 加上 -f 参数，强制读取 auth.json 中的块大小配置和多线程配置.
        // 不加 -f 参数, 每次覆盖保存当前使用参数到 auth.json 配置文件中.
        Force Read config form config file. <span class="o">[</span>BlockSize, ThreadNum<span class="o">]</span>
  -skip
        // 开关
        // 跳过上传网盘中已存在的同名文件. <span class="o">(</span>默认不跳过<span class="o">)</span>
        Skip exist file on remote.
  -cn
        // 开关
        // 授权中国版<span class="o">(</span>世纪互联<span class="o">)</span>, 需要此参数.
        OneDrive by 21Vianet.
  -ms
        // 开关
        // 授权个人版<span class="o">(</span>家庭版<span class="o">)</span>, 需要此参数.
        OneDrive by Microsoft.
</code></pre></td></tr></table>
</div>
</div><h3 id="4-命令示例">4. 命令示例</h3>
<div class="highlight"><div class="chroma">
<table class="lntable"><tr><td class="lntd">
<pre class="chroma"><code><span class="lnt"> 1
</span><span class="lnt"> 2
</span><span class="lnt"> 3
</span><span class="lnt"> 4
</span><span class="lnt"> 5
</span><span class="lnt"> 6
</span><span class="lnt"> 7
</span><span class="lnt"> 8
</span><span class="lnt"> 9
</span><span class="lnt">10
</span><span class="lnt">11
</span><span class="lnt">12
</span><span class="lnt">13
</span><span class="lnt">14
</span><span class="lnt">15
</span><span class="lnt">16
</span><span class="lnt">17
</span></code></pre></td>
<td class="lntd">
<pre class="chroma"><code class="language-bash" data-lang="bash"><span class="c1">#将当前目录下的mm00.jpg文件上传到OneDrive网盘根目录</span>
OneDriveUploader -c /path/to/file/auth.json -s <span class="s2">&#34;mm00.jpg&#34;</span>

<span class="c1">#将当前目录下的mm00.jpg文件上传到OneDrive网盘根目录，并改名为mm01.jpg</span>
OneDriveUploader -c /path/to/file/auth.json -s <span class="s2">&#34;mm00.jpg&#34;</span> -n <span class="s2">&#34;mm01.jpg&#34;</span>

<span class="c1">#将当前目录下的Download文件夹上传到OneDrive网盘根目录</span>
OneDriveUploader -c /path/to/file/auth.json -s <span class="s2">&#34;Download&#34;</span> 

<span class="c1">#将当前目录下的Download文件夹上传到OneDrive网盘Test目录中</span>
OneDriveUploader -c /path/to/file/auth.json -s <span class="s2">&#34;Download&#34;</span> -r <span class="s2">&#34;Test&#34;</span>

<span class="c1">#将同目录下的Download文件夹上传到OneDriv网盘Test目录中，使用10线程</span>
OneDriveUploader -c /path/to/file/auth.json -t <span class="m">10</span> -s <span class="s2">&#34;Download&#34;</span> -r <span class="s2">&#34;Test&#34;</span>

<span class="c1">#将同目录下的Download文件夹上传到OneDrive网盘Test目录中，使用15线程，并设置分块大小为20M</span>
OneDriveUploader -c /path/to/file/auth.json -t <span class="m">15</span> -b <span class="m">20</span> -s <span class="s2">&#34;Download&#34;</span> -r <span class="s2">&#34;Test&#34;</span>
</code></pre></td></tr></table>
</div>
</div><hr>
<p>  </p>
<h2 id="aria2-自动上传">aria2 自动上传</h2>
<h3 id="1-aria2-自动上传脚本">1. aria2 自动上传脚本</h3>
<p>上传脚本代码如下：</p>
<div class="highlight"><div class="chroma">
<table class="lntable"><tr><td class="lntd">
<pre class="chroma"><code><span class="lnt"> 1
</span><span class="lnt"> 2
</span><span class="lnt"> 3
</span><span class="lnt"> 4
</span><span class="lnt"> 5
</span><span class="lnt"> 6
</span><span class="lnt"> 7
</span><span class="lnt"> 8
</span><span class="lnt"> 9
</span><span class="lnt">10
</span><span class="lnt">11
</span><span class="lnt">12
</span><span class="lnt">13
</span><span class="lnt">14
</span><span class="lnt">15
</span><span class="lnt">16
</span><span class="lnt">17
</span><span class="lnt">18
</span><span class="lnt">19
</span><span class="lnt">20
</span><span class="lnt">21
</span><span class="lnt">22
</span><span class="lnt">23
</span><span class="lnt">24
</span><span class="lnt">25
</span><span class="lnt">26
</span><span class="lnt">27
</span><span class="lnt">28
</span><span class="lnt">29
</span><span class="lnt">30
</span><span class="lnt">31
</span><span class="lnt">32
</span><span class="lnt">33
</span><span class="lnt">34
</span><span class="lnt">35
</span><span class="lnt">36
</span><span class="lnt">37
</span><span class="lnt">38
</span></code></pre></td>
<td class="lntd">
<pre class="chroma"><code class="language-sh" data-lang="sh"><span class="cp">#!/bin/bash
</span><span class="cp"></span>
<span class="nv">GID</span><span class="o">=</span><span class="s2">&#34;</span><span class="nv">$1</span><span class="s2">&#34;</span><span class="p">;</span>
<span class="nv">FileNum</span><span class="o">=</span><span class="s2">&#34;</span><span class="nv">$2</span><span class="s2">&#34;</span><span class="p">;</span>
<span class="nv">File</span><span class="o">=</span><span class="s2">&#34;</span><span class="nv">$3</span><span class="s2">&#34;</span><span class="p">;</span>
<span class="nv">MaxSize</span><span class="o">=</span><span class="s2">&#34;15728640&#34;</span><span class="p">;</span>
<span class="nv">Thread</span><span class="o">=</span><span class="s2">&#34;3&#34;</span><span class="p">;</span>  <span class="c1">#默认3线程，自行修改，服务器配置不好的话，不建议太多</span>
<span class="nv">Block</span><span class="o">=</span><span class="s2">&#34;5&#34;</span><span class="p">;</span>  <span class="c1">#默认分块5m，自行修改</span>
<span class="nv">RemoteDIR</span><span class="o">=</span><span class="s2">&#34;&#34;</span><span class="p">;</span>  <span class="c1">#上传到Onedrive的路径，默认为根目录，如果要上传到MOERATS目录，&#34;&#34;里面请填成MOERATS</span>
<span class="nv">LocalDIR</span><span class="o">=</span><span class="s2">&#34;/www/download/&#34;</span><span class="p">;</span>  <span class="c1">#Aria2下载目录，记得最后面加上/</span>
<span class="nv">Uploader</span><span class="o">=</span><span class="s2">&#34;/usr/local/bin/OneDriveUploader&#34;</span><span class="p">;</span>  <span class="c1">#上传的程序完整路径，默认为本文安装的目录</span>
<span class="nv">Config</span><span class="o">=</span><span class="s2">&#34;/root/auth.json&#34;</span><span class="p">;</span>  <span class="c1">#初始化生成的配置auth.json绝对路径，参考第3步骤生成的路径</span>


<span class="k">if</span> <span class="o">[[</span> -z <span class="k">$(</span><span class="nb">echo</span> <span class="s2">&#34;</span><span class="nv">$FileNum</span><span class="s2">&#34;</span> <span class="p">|</span>grep -o <span class="s1">&#39;[0-9]*&#39;</span> <span class="p">|</span>head -n1<span class="k">)</span> <span class="o">]]</span><span class="p">;</span> <span class="k">then</span> <span class="nv">FileNum</span><span class="o">=</span><span class="s1">&#39;0&#39;</span><span class="p">;</span> <span class="k">fi</span>
<span class="k">if</span> <span class="o">[[</span> <span class="s2">&#34;</span><span class="nv">$FileNum</span><span class="s2">&#34;</span> -le <span class="s1">&#39;0&#39;</span> <span class="o">]]</span><span class="p">;</span> <span class="k">then</span> <span class="nb">exit</span> 0<span class="p">;</span> <span class="k">fi</span>
<span class="k">if</span> <span class="o">[[</span> <span class="s2">&#34;</span><span class="nv">$#</span><span class="s2">&#34;</span> !<span class="o">=</span> <span class="s1">&#39;3&#39;</span> <span class="o">]]</span><span class="p">;</span> <span class="k">then</span> <span class="nb">exit</span> 0<span class="p">;</span> <span class="k">fi</span>

<span class="k">function</span> LoadFile<span class="o">(){</span>
  <span class="k">if</span> <span class="o">[[</span> ! -e <span class="s2">&#34;</span><span class="si">${</span><span class="nv">Uploader</span><span class="si">}</span><span class="s2">&#34;</span> <span class="o">]]</span><span class="p">;</span> <span class="k">then</span> <span class="k">return</span><span class="p">;</span> <span class="k">fi</span>
  <span class="nv">IFS_BAK</span><span class="o">=</span><span class="nv">$IFS</span>
  <span class="nv">IFS</span><span class="o">=</span><span class="s1">$&#39;\n&#39;</span>
  <span class="nv">tmpFile</span><span class="o">=</span><span class="s2">&#34;</span><span class="k">$(</span><span class="nb">echo</span> <span class="s2">&#34;</span><span class="si">${</span><span class="nv">File</span><span class="p">/#</span><span class="nv">$LocalDIR</span><span class="si">}</span><span class="s2">&#34;</span> <span class="p">|</span>cut -f1 -d<span class="s1">&#39;/&#39;</span><span class="k">)</span><span class="s2">&#34;</span>
  <span class="nv">FileLoad</span><span class="o">=</span><span class="s2">&#34;</span><span class="si">${</span><span class="nv">LocalDIR</span><span class="si">}${</span><span class="nv">tmpFile</span><span class="si">}</span><span class="s2">&#34;</span>
  <span class="k">if</span> <span class="o">[[</span> ! -e <span class="s2">&#34;</span><span class="si">${</span><span class="nv">FileLoad</span><span class="si">}</span><span class="s2">&#34;</span> <span class="o">]]</span><span class="p">;</span> <span class="k">then</span> <span class="k">return</span><span class="p">;</span> <span class="k">fi</span>
  <span class="nv">ItemSize</span><span class="o">=</span><span class="k">$(</span>du -s <span class="s2">&#34;</span><span class="si">${</span><span class="nv">FileLoad</span><span class="si">}</span><span class="s2">&#34;</span> <span class="p">|</span>cut -f1 <span class="p">|</span>grep -o <span class="s1">&#39;[0-9]*&#39;</span> <span class="p">|</span>head -n1<span class="k">)</span>
  <span class="k">if</span> <span class="o">[[</span> -z <span class="s2">&#34;</span><span class="nv">$ItemSize</span><span class="s2">&#34;</span> <span class="o">]]</span><span class="p">;</span> <span class="k">then</span> <span class="k">return</span><span class="p">;</span> <span class="k">fi</span>
  <span class="k">if</span> <span class="o">[[</span> <span class="s2">&#34;</span><span class="nv">$ItemSize</span><span class="s2">&#34;</span> -ge <span class="s2">&#34;</span><span class="nv">$MaxSize</span><span class="s2">&#34;</span> <span class="o">]]</span><span class="p">;</span> <span class="k">then</span>
    <span class="nb">echo</span> -ne <span class="s2">&#34;\033[33m</span><span class="si">${</span><span class="nv">FileLoad</span><span class="si">}</span><span class="s2"> \033[0mtoo large to spik.\n&#34;</span><span class="p">;</span>
    <span class="k">return</span><span class="p">;</span>
  <span class="k">fi</span>
  <span class="si">${</span><span class="nv">Uploader</span><span class="si">}</span> -c <span class="s2">&#34;</span><span class="si">${</span><span class="nv">Config</span><span class="si">}</span><span class="s2">&#34;</span> -t <span class="s2">&#34;</span><span class="si">${</span><span class="nv">Thread</span><span class="si">}</span><span class="s2">&#34;</span> -b <span class="s2">&#34;</span><span class="si">${</span><span class="nv">Block</span><span class="si">}</span><span class="s2">&#34;</span> -s <span class="s2">&#34;</span><span class="si">${</span><span class="nv">FileLoad</span><span class="si">}</span><span class="s2">&#34;</span> -r <span class="s2">&#34;</span><span class="si">${</span><span class="nv">RemoteDIR</span><span class="si">}</span><span class="s2">&#34;</span> -skip
  <span class="k">if</span> <span class="o">[[</span> <span class="nv">$?</span> <span class="o">==</span> <span class="s1">&#39;0&#39;</span> <span class="o">]]</span><span class="p">;</span> <span class="k">then</span>
    rm -rf <span class="s2">&#34;</span><span class="si">${</span><span class="nv">FileLoad</span><span class="si">}</span><span class="s2">&#34;</span><span class="p">;</span>
  <span class="k">fi</span>
  <span class="nv">IFS</span><span class="o">=</span><span class="nv">$IFS_BAK</span>
<span class="o">}</span>
LoadFile<span class="p">;</span>
</code></pre></td></tr></table>
</div>
</div><p>编辑好上传脚本后，可以检测下脚本编码是否正确，比如我脚本路径为 <code>/root/upload.sh</code> ，使用命令：</p>
<div class="highlight"><div class="chroma">
<table class="lntable"><tr><td class="lntd">
<pre class="chroma"><code><span class="lnt">1
</span></code></pre></td>
<td class="lntd">
<pre class="chroma"><code class="language-bash" data-lang="bash">bash /root/upload.sh
</code></pre></td></tr></table>
</div>
</div><p>如果无任何输出，则正确，反之输出类似 <code>$'r': command not found</code> 错误，则需要转换下编码格式，具体步骤如下。</p>
<p>先安装 <code>dos2unix</code> ：</p>
<div class="highlight"><div class="chroma">
<table class="lntable"><tr><td class="lntd">
<pre class="chroma"><code><span class="lnt">1
</span><span class="lnt">2
</span><span class="lnt">3
</span><span class="lnt">4
</span><span class="lnt">5
</span></code></pre></td>
<td class="lntd">
<pre class="chroma"><code class="language-bash" data-lang="bash"><span class="c1">#CentOS系统</span>
yum install dos2unix -y

<span class="c1">#Debian/Ubuntu系统</span>
apt install dos2unix -y
</code></pre></td></tr></table>
</div>
</div><p>再转换编码：</p>
<div class="highlight"><div class="chroma">
<table class="lntable"><tr><td class="lntd">
<pre class="chroma"><code><span class="lnt">1
</span><span class="lnt">2
</span></code></pre></td>
<td class="lntd">
<pre class="chroma"><code class="language-bash" data-lang="bash"><span class="c1">#后面为脚本路径</span>
dos2unix /root/upload.sh
</code></pre></td></tr></table>
</div>
</div><h3 id="2-下载完成后执行">2. 下载完成后执行</h3>
<p>设置下载完成自动上传，传输后删除服务器上的文件：</p>
<div class="highlight"><div class="chroma">
<table class="lntable"><tr><td class="lntd">
<pre class="chroma"><code><span class="lnt">1
</span><span class="lnt">2
</span></code></pre></td>
<td class="lntd">
<pre class="chroma"><code class="language-bash" data-lang="bash"><span class="c1">#授权</span>
chmod +x /root/upload.sh
</code></pre></td></tr></table>
</div>
</div><p>然后到 <code>aria2</code> 配置文件中加上一行：</p>
<p><code>on-download-complete=/root/upload.sh</code></p>
<p>即可，后面为脚本的路径。</p>
<p>最后重启 <code>aria2</code> 生效。</p>
<div class="highlight"><div class="chroma">
<table class="lntable"><tr><td class="lntd">
<pre class="chroma"><code><span class="lnt">1
</span></code></pre></td>
<td class="lntd">
<pre class="chroma"><code class="language-bash" data-lang="bash">systemctl restart aria2
</code></pre></td></tr></table>
</div>
</div><hr>
<p>  </p>
<p>至此，当 aria2 中的下载任务完成后会自动将文件上传到 OneDrive ，之后可以利用 IDM 下载到本地，实现吃灰小鸡再就业。</p>
<p>PS：几个指令：</p>
<ol>
<li>使用 <code>clear</code> 命令或 <code>reset</code> 命令清空当前屏幕，or
清空屏幕快捷键：</li>
</ol>
<div class="highlight"><div class="chroma">
<table class="lntable"><tr><td class="lntd">
<pre class="chroma"><code><span class="lnt">1
</span></code></pre></td>
<td class="lntd">
<pre class="chroma"><code class="language-bash" data-lang="bash">ctrl + l
</code></pre></td></tr></table>
</div>
</div><ol start="2">
<li>清空当前输入快捷键：</li>
</ol>
<div class="highlight"><div class="chroma">
<table class="lntable"><tr><td class="lntd">
<pre class="chroma"><code><span class="lnt">1
</span></code></pre></td>
<td class="lntd">
<pre class="chroma"><code class="language-bash" data-lang="bash">   ctrl + u
</code></pre></td></tr></table>
</div>
</div><ol start="3">
<li>放弃当前输入快捷键：</li>
</ol>
<div class="highlight"><div class="chroma">
<table class="lntable"><tr><td class="lntd">
<pre class="chroma"><code><span class="lnt">1
</span></code></pre></td>
<td class="lntd">
<pre class="chroma"><code class="language-bash" data-lang="bash">   ctrl + z
</code></pre></td></tr></table>
</div>
</div><p>  </p>
<p>  </p>
</div><div class="post-footer" id="post-footer">
    <div class="post-info">
        <div class="post-info-line">
            <div class="post-info-mod">
                <span>更新于 2020-09-24&nbsp;<a class="git-hash" href="https://github.com/Lucas-0/Lucas-0.github.io/commit/888d0edb83663909675d6e2362e3bbed7e8ad6c0" target="_blank" title="commit by Lucas(raisingsha@gmail.com) 888d0edb83663909675d6e2362e3bbed7e8ad6c0: hide expired post">
                                    <i class="fas fa-hashtag fa-fw"></i>888d0ed</a></span>
            </div>
            <div class="post-info-license"></div>
        </div>
        <div class="post-info-line">
            <div class="post-info-md"></div>
            <div class="post-info-share">
                <span><a href="javascript:void(0);" title="分享到 Twitter" data-sharer="twitter" data-url="https://lucas-0.github.io/2020-05-14-install-aria2/" data-title="linux 下安装 aria2 及自动上传到 OneDrive" data-hashtags="aria2,OneDrive"><i class="fab fa-twitter fa-fw"></i></a><a href="javascript:void(0);" title="分享到 Facebook" data-sharer="facebook" data-url="https://lucas-0.github.io/2020-05-14-install-aria2/" data-hashtag="aria2"><i class="fab fa-facebook-square fa-fw"></i></a><a href="javascript:void(0);" title="分享到 Hacker News" data-sharer="hackernews" data-url="https://lucas-0.github.io/2020-05-14-install-aria2/" data-title="linux 下安装 aria2 及自动上传到 OneDrive"><i class="fab fa-hacker-news fa-fw"></i></a><a href="javascript:void(0);" title="分享到 Line" data-sharer="line" data-url="https://lucas-0.github.io/2020-05-14-install-aria2/" data-title="linux 下安装 aria2 及自动上传到 OneDrive"><i data-svg-src="https://cdn.jsdelivr.net/npm/simple-icons@2.14.0/icons/line.svg"></i></a><a href="javascript:void(0);" title="分享到 Pocket" data-sharer="pocket" data-url="https://lucas-0.github.io/2020-05-14-install-aria2/"><i class="fab fa-get-pocket fa-fw"></i></a><a href="javascript:void(0);" title="分享到 微博" data-sharer="weibo" data-url="https://lucas-0.github.io/2020-05-14-install-aria2/" data-title="linux 下安装 aria2 及自动上传到 OneDrive"><i class="fab fa-weibo fa-fw"></i></a></span>
            </div>
        </div>
    </div>

    <div class="post-info-more">
        <section class="post-tags"><i class="fas fa-tags fa-fw"></i>&nbsp;<a href="/tags/aria2/">aria2</a>,&nbsp;<a href="/tags/onedrive/">OneDrive</a></section>
        <section>
            <span><a href="javascript:void(0);" onclick="window.history.back();">返回</a></span>&nbsp;|&nbsp;<span><a href="/">主页</a></span>
        </section>
    </div>

    <div class="post-nav"><a href="/2020-05-05-git-get-started/" class="prev" rel="prev" title="Git 入门及连接多个远程仓库"><i class="fas fa-angle-left fa-fw"></i>Git 入门及连接多个远程仓库</a>
            <a href="/2020-06-30-hugo-and-loveit/" class="next" rel="next" title="Hugo 博客使用 LoveIt 主题">Hugo 博客使用 LoveIt 主题<i class="fas fa-angle-right fa-fw"></i></a></div>
</div>
<div id="comments"><div id="utterances"></div><noscript>
                Please enable JavaScript to view the comments powered by <a href="https://utteranc.es/">Utterances</a>.
            </noscript></div></article></div>
            </main><footer class="footer">
        <div class="footer-container"><div class="footer-line"><i class='far fa-smile-wink'></i>&nbsp;有趣之事即是好事</div><div class="footer-line"><i class="far fa-copyright fa-fw"></i><span itemprop="copyrightYear">2020</span><span class="author" itemprop="copyrightHolder">&nbsp;<a href="https://lucas-0.github.io/about/" target="_blank">Lucas</a></span>&nbsp;|&nbsp;<span class="license"><a rel="license external nofollow noopener noreffer" href="https://creativecommons.org/licenses/by-nc/4.0/" target="_blank">CC BY-NC 4.0</a></span><span class="icp-splitter">&nbsp;|&nbsp;</span><br class="icp-br"/>
                    <span class="icp">La vita è bella</span></div>
        </div>
    </footer></div>

        <div id="fixed-buttons"><a href="#" id="back-to-top" class="fixed-button" title="回到顶部">
                <i class="fas fa-arrow-up fa-fw"></i>
            </a><a href="#" id="view-comments" class="fixed-button" title="查看评论">
                <i class="fas fa-comment fa-fw"></i>
            </a>
        </div><link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/cookieconsent@3.1.1/build/cookieconsent.min.css"><script type="text/javascript" src="https://cdn.jsdelivr.net/npm/smooth-scroll@16.1.3/dist/smooth-scroll.min.js"></script><script type="text/javascript" src="https://cdn.jsdelivr.net/npm/autocomplete.js@0.37.1/dist/autocomplete.min.js"></script><script type="text/javascript" src="https://cdn.jsdelivr.net/npm/algoliasearch@4.2.0/dist/algoliasearch-lite.umd.min.js"></script><script type="text/javascript" src="https://cdn.jsdelivr.net/npm/lazysizes@5.2.2/lazysizes.min.js"></script><script type="text/javascript" src="https://cdn.jsdelivr.net/npm/clipboard@2.0.6/dist/clipboard.min.js"></script><script type="text/javascript" src="https://cdn.jsdelivr.net/npm/sharer.js@0.4.0/sharer.min.js"></script><script type="text/javascript" src="https://cdn.jsdelivr.net/npm/cookieconsent@3.1.1/build/cookieconsent.min.js"></script><script type="text/javascript">window.config={"code":{"copyTitle":"复制到剪贴板","maxShownLines":15},"comment":{"utterances":{"darkTheme":"github-dark","issueTerm":"title","label":"","lightTheme":"github-light","repo":"Lucas-0/comment"}},"cookieconsent":{"content":{"dismiss":"吼","link":"了解更多","message":"投喂小饼干?"},"enable":true,"palette":{"button":{"background":"#f0f0f0"},"popup":{"background":"#1aa3ff"}},"theme":"edgeless"},"search":{"algoliaAppID":"RA4BOTUVZQ","algoliaIndex":"myBlog","algoliaSearchKey":"42c8139aee413081073e99c2f080227d","highlightTag":"em","maxResultLength":10,"noResultsFound":"没有找到结果","snippetLength":50,"type":"algolia"}};</script><script type="text/javascript" src="/js/theme.min.js"></script></body>
</html>
